<%-- 
    Document   : index
    Created on : Sep 27, 2011, 8:17:38 PM
    Author     : Yonatan
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@include file="WEB-INF/webcon/connectionmysql.jsp"  %>
<link rel="stylesheet" type="text/css" href="css/CSS.css" />
<script type="text/javascript" src="js/jquery-1.4.min.js"></script>
<script type="text/javascript" src="js/jquery.validationEngine.js"></script>
<script type="text/javascript" src="js/jquery.jcarousel.pack.js"></script>
<script type="text/javascript" src="js/junction.js"></script>
<script type="text/javascript" src="js/custom.js"></script>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<%
    ResultSet rsKon = a.executeQuery("Select * from admin order by id asc limit 8 ");
%>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <div id="wrapper"> <!-- body main -->
            <div id="page-container">
                <ul id="page" class="jcarousel-skin-tango">

                    <li>
                        <span class="content">
        <h1><b>SAMPLE JSP CREATE,UPDATE,DELETE WITH JQUERY</b></h1>
         <br><br>
        <table border="1">
            <thead>
                <tr>
                    <th>id</th>
                    <th>nama</th>
                    <th>password</th>
                    <th>ACTION</th>
                </tr>
            </thead>
            <%
                while(rsKon.next()){
                    String id = rsKon.getString(1);
                    String nama = rsKon.getString(2);
                    String password = rsKon.getString(3);

            %>
            <tbody>
                <tr>
                    <td><%=id%></td>
                    <td><%=nama%></td>
                    <td><%=password%></td>
                    <td>
                        <a href="Update.jsp?id=<%= id %>"><b>Update</b></a><b> | </b>
                        <a href="./DeleteData?id=<%= id %>"><b>delete</b></a>
                    </td>
                </tr>
                 <%
                    }
                 %>

            </tbody>
        </table>
                 <br><br><br><br><br>
                 <b>Click here to create data</b>
                 <a class="control" href="#" onClick="jq.validationEngine.closePrompt('.formError',true)">2</a>

                 </span>
                 </li>

                 <li>
                     <span class="content">
                <br>
                <br>
                <form name="actiontambah" action="actiontambah.jsp" method="POST">
                    <table border="1" id="margintable">
                        <thead>
                            <tr>
                                <th>name</th>
                                <th>input</th>

                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td width="100">id</td>
                                <td><input type="text" name="id" value="" size="60" /></td>

                            </tr>
                            <tr>
                                <td width="100">nama</td>
                                <td><input type="text" name="nama" value="" size="60" /></td>

                            <tr>
                                <td width="100">password</td>
                                <td><input type="text" name="password" value="" size="60" /></td>

                            </tr>
                            <tr>
                                <td></td>
                                <td><input type="submit" value="POST" name="kirim" /></td>
                            </tr>
                        </tbody>
                    </table>

                </form>
                 <br><br><br><br><br>
                <a class="control2" href="#" onClick="jq.validationEngine.closePrompt('.formError',true)">1</a>   </span>
                </li>
                <br>

                </ul>
            </div>
        </div>
    </body>
</html>